package com.ymttest.database.sqlwapper;

import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.utils.EnvSetup;

public class UserLevelWapper {
	SqlManager manage;

	public UserLevelWapper() {
		manage = new SqlManager("ymt" + EnvSetup.getEnv());
	}
	
	/**
	 * 根据用户Id获取用户等级信息
	 * @param userId
	 * @return
	 */
	public Map getUserLevelByUserId(String userId){
		List<Map> user = (List<Map>) manage.getSelectResults("com.ymttest.database.mapping.UserLevelMapper.getUserLevelByUserId", userId);
		if(user.size()>0) return user.get(0);
		return null;
	}
}
